import { ElMessage, ElMessageBox } from 'element-plus'

const confirm = (message, okfun, title, type, center,) => {
  ElMessageBox.confirm(
    message,
    title || '提示',
    {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      type: type === null ? type : 'info',
      center
    }
  )
    .then(() => {
      okfun()
    })
    .catch(() => {

    })
}

export default confirm